<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ManagerManager for Modx: Function reference: Sections</title>
<link href="css/mm.css" rel="stylesheet" type="text/css" />


</head>

<body>

<div id="banner">

</div>


<div id="main">
    <div id="nav">
        <ul>
            <li><a href="index.htm">Introduction</a></li>
            <li><a href="install.htm">Installation</a></li>
            <li><a href="getting-started.htm">Getting started</a></li>
            <li><a href="field-names.htm">Field names</a></li>
            <li><a href="fields.htm">Fields</a></li>
            <li><a href="tabs.htm">Tabs</a></li>
            <li><a href="widgets.htm">Widgets</a></li>
            <li>Sections</li>
            <li><a href="changelog.htm">Changelog</a></li>
        </ul>   
    </div>
    
  <div id="content">
      <h1>Function reference: Sections</h1>
      <p>&quot;Sections&quot; are the areas of a document edit tab, e.g. Resource content and Template Variable.</p>
      <h2>mm_renameSection($section, $newlabel, $roles, $templates)</h2>
      <p>Renames one of the default sections within the document edit page.</p>
      <p><strong>$section: </strong>The name of the section this should apply to (from <a href="field-names.htm">'section names' table</a>). Can only accept single section [Required]<br />
          <strong>$newlabel:</strong> The new text for the label[Required]<br />
          <strong>$roles:</strong> comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]<br />
          <strong>$templates:</strong> comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]</p>
      <p><code>mm_renameSection('content', 'Technical stuff', '2'); // Rename the document content section for users with role &quot;2&quot;</code><code>mm_renameSection('tvs', 'Other info'); // Rename the Template Variables section to &quot;Other info&quot; for all users</code></p>
      <h2>mm_hideSections($sections,  $roles, $templates)</h2>
      <p>Hides one or more of the default  sections within the document edit page.</p>
      <p><strong>$sections: </strong>The name(s) of the sections this should apply to (from <a href="field-names.htm">'section names' table</a>). Can  accept multiple sections separated by commas [Required]<br />
          <strong>$roles:</strong> comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]<br />
          <strong>$templates:</strong> comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]</p>
      <code>mm_hideSections('tvs'); // Hide the template variables section for all users</code><code>mm_hideSections('content,tvs', '1', '3'); // Hide the content and Template Variables sections for users with role &quot;1&quot; editing documents using template ID &quot;3&quot;</code></div>
</div>
</body>
</html>
